/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.oracleandsxnd.erp.xsd.service;

import com.oracleandsxnd.erp.common.persistence.Page;
import com.oracleandsxnd.erp.common.service.CrudService;
import com.oracleandsxnd.erp.xsd.dao.XsglSaleVoiceDao;
import com.oracleandsxnd.erp.xsd.entity.XsglSale;
import com.oracleandsxnd.erp.xsd.entity.XsglSaleVoice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 发票管理Service
 * @author 发票管理
 * @version 2019-12-21
 */
@Service
@Transactional(readOnly = true)
public class XsglSaleVoiceService extends CrudService<XsglSaleVoiceDao, XsglSaleVoice> {

	public XsglSaleVoice get(String id) {
		return super.get(id);
	}
	
	public List<XsglSaleVoice> findList(XsglSaleVoice xsglSaleVoice) {
		return super.findList(xsglSaleVoice);
	}
	
	public Page<XsglSaleVoice> findPage(Page page, XsglSaleVoice xsglSaleVoice) {
		return super.findPage(page, xsglSaleVoice);
	}
	@Autowired
	private XsglSaleService xsglSaleService;
	@Transactional(readOnly = false)
	public void save(XsglSaleVoice xsglSaleVoice) {
		super.save(xsglSaleVoice);
		xsglSaleService.fp(new XsglSale(xsglSaleVoice.getSaleid()));
	}
	
	@Transactional(readOnly = false)
	public void delete(XsglSaleVoice xsglSaleVoice) {
		super.delete(xsglSaleVoice);
	}
	
}